# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Peter Wu <peter@lekensteyn.nl>
# Contributor: Miguel Revilla <yo@miguelrevilla.com>
# Contributor: s1gma <s1gma@mindslicer.com>

pkgname=binwalk
pkgver=2.3.4
pkgrel=2
pkgdesc='Tool for searching a given binary image for embedded files'
url='https://github.com/ReFirmLabs/binwalk'
arch=('any')
license=('MIT')
depends=('python')
optdepends=(
  'python-opengl: binviz module support'
  'python-capstone: disassembly support'
  'arj: ARJ decompression support'
  'cabextract: CAB archive support'
  'cpio: CPIO archive support'
  'gzip: GZIP decompression support'
  'mtd-utils: JFFS filesystem support'
  'p7zip: ZIP, LZMA and ISO decompression support'
  'squashfs-tools: squashfs support'
  'tar: TAR archive support'
  'bzip2: BZIP2 archive support'
  'unrar: RAR decompression support'
  'xz: XZ decompression support'
  'lhasa: LHA support'
  'sleuthkit: forensic analysis support'
)
source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('5a5e16035dfc05b94ae4ee3969a337336c550606b71e20fcb1f150c4b38ef2084b6a823ce2a8050f4b41616b7d7c31cfb04bf43e7f2c977ab1a634aba9d67fec')
b2sums=('a5eac4242402c5034c293432131950bed9aff762c5db86b200a1f555bdfeeb1c6fda225393149f7beca2923141f2ae7930738038f2d039513cb06dfae9601b81')

build() {
  cd ${pkgname}-${pkgver}
  python setup.py build
}

package() {
  cd ${pkgname}-${pkgver}
  python setup.py install -O1 --prefix="${pkgdir}/usr"
  install -Dm 644 *.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
